<template>
    <div class="inspectorLibrary-increase">
        <!-- 新增弹窗 -->
        <a-modal
         width="100%"
         wrapClassName="full-modal"
         class="inspectorLibrary-modal-add"
         :visible="visibleShow" 
         :title="addEditParameter.id?'编辑':'新增'" 
         @ok="handleOk" 
         :forceRender="true"
         :confirmLoading="confirmLoading"
         @cancel="visibleShow = false">
            <a-spin size="large" :spinning="spinning">
                <a-input
                    name="inputName"
                    style="display:none"
                    v-model:value="showValue"/>
                <a-input-password
                    name="inputName"
                    style="display:none"
                    v-model:value="showValue1"
                />
                <a-form
                layout="inline" 
                v-if="visibleShow" 
                :form="form" 
                :label-col="{ span: 8 }" 
                :wrapper-col="{ span: 12 }" 
                @submit="handleSubmit">
                    <a-form-item label="账号">
                        <a-input
                        v-if="!addEditParameter.isEdit"
                        placeholder="请输入账号"
                        v-decorator="[
                            'username', { initialValue:formState.username, rules: rules.username}
                        ]"/>
                        <span v-else>{{ formState.username }}</span>
                    </a-form-item>
                    <a-form-item label="真实姓名">
                        <a-input
                        placeholder="请输入真实姓名"
                        v-decorator="[
                            'realname', { initialValue:formState.realname, rules: rules.realname}
                        ]"/>
                    </a-form-item>
                    <a-form-item label="手机号码">
                        <a-input
                        placeholder="请输入手机号码"
                        v-decorator="['phone', { initialValue:formState.phone, rules: rules.phone}]"/>
                    </a-form-item>
                    <a-form-item label="性别">
                        <compSelector
                        v-model="formState.sex" 
                        :defaultValue="formState.sex"
                        :compType="typeRadio"
                        dictionaryType="用户性别"
                        />
                    </a-form-item>
                    <a-form-item label="电子邮箱">
                        <a-input
                        placeholder="请输入电子邮箱"
                        v-model:value="formState.email"/>
                    </a-form-item>
                    <a-form-item label="所属区域">
                        <a-select
                            placeholder="请选择所属区域"
                            v-model:value="formState.fssqy"
                        >
                            <a-select-option :value="item.value" v-for="(item,index) in optionsArr">
                                {{item.label}}
                            </a-select-option>
                        </a-select>
                    </a-form-item>
                    <a-form-item label="民族">
                        <a-input
                        placeholder="请输入民族"
                        v-model:value="formState.fmz"/>
                    </a-form-item>
                    <a-form-item label="政治面貌">
                        <a-input
                        placeholder="请输入政治面貌"
                        v-model:value="formState.fzzmm"/>
                    </a-form-item>
                    <a-form-item label="是否药检所人员">
                        <compSelector
                        v-model="formState.fsfyjsry" 
                        :compType="typeRadio"
                        :defaultValue="formState.fsfyjsry"
                        :options="[{label:'是',value:'是'},{label:'否',value:'否'}]"
                        />
                    </a-form-item>
                    <a-form-item label="身份证号" class="inspector-library-item-box">
                        <a-input-password
                        autocomplete="new-password"
                        placeholder="请输入身份证号"
                        v-decorator="['fsfzh', { initialValue:formState.fsfzh, rules: rules.fsfzh}]"
                        />
                    </a-form-item>
                    <div style="border-top: 1px solid rgb(233 228 228);margin: 10px 0;"/>
                    <!-- ------------------- -->
                    <a-form-item label="学历">
                        <a-input
                        placeholder="请输入学历"
                        v-model:value="formState.fxl"/>
                    </a-form-item>
                    <a-form-item label="毕业院校" class="inspector-library-item-box">
                        <a-input
                        placeholder="请输入毕业院校"
                        v-model:value="formState.fbyyx"/>
                    </a-form-item>
                    <a-form-item label="所学专业">
                        <a-input
                        placeholder="请输入所学专业"
                        v-model:value="formState.fsxzy"/>
                    </a-form-item>
                    <a-form-item label="从事工作">
                        <a-input
                        placeholder="请输入从事工作"
                        v-model:value="formState.fcsgz"/>
                    </a-form-item>
                    <a-form-item label="职称">
                        <a-input
                        placeholder="请输入职称"
                        v-model:value="formState.fzc"/>
                    </a-form-item>
                    <a-form-item label="职务">
                        <a-input
                        placeholder="请输入职务"
                        v-model:value="formState.fzw"/>
                    </a-form-item>
                    <a-form-item label="执勤状态">
                        <compSelector
                        v-if="!addEditParameter.isEdit"
                        v-model="formState.fgzzt"
                        :compType="typeSelect"
                        :defaultValue="formState.fgzzt"
                        dictionaryType="核查员工作状态"
                        :width="150"
                        />
                        <span v-else>{{ formState.fgzzt }}</span>
                    </a-form-item>
                    <a-form-item label="工作单位" class="inspector-library-item-box">
                        <a-input
                        placeholder="请输入工作单位"
                        v-model:value="formState.fgzdw"
                        v-decorator="['fgzdw', { initialValue:formState.fgzdw, rules: rules.fgzdw}]"/>
                    </a-form-item>
                    <a-form-item label="工作单位地址" class="inspector-library-item-box">
                        <a-input
                        placeholder="请输入工作单位地址"
                        v-model:value="formState.fgzdwdz"/>
                    </a-form-item>
                    <a-form-item label="单位类型">
                        <compSelector
                        v-model="formState.fdwlx" 
                        :compType="typeSelect"
                        :defaultValue="formState.fdwlx"
                        dictionaryType="单位类型"
                        :width="150"
                        />
                    </a-form-item>
                    <a-form-item label="单位电话">
                        <a-input
                        placeholder="请输入单位电话"
                        v-model:value="formState.fdwdh"/>
                    </a-form-item>
                    <a-form-item label="单位邮箱">
                        <a-input
                        placeholder="请输入单位邮箱"
                        v-model:value="formState.fdwyx"/>
                    </a-form-item>
                    
                    <a-form-item label="银行卡号" class="inspector-library-item-box">
                        <a-input-password
                        ref="inputRef"
                        placeholder="请输入银行卡号"
                        v-model:value="formState.fyhkh"/>
                    </a-form-item>
                    <a-form-item label="开户行所在地">
                        <a-input
                        placeholder="请输入开户行所在地"
                        v-model:value="formState.fkhhszd"/>
                    </a-form-item>
                    <a-form-item label="开户行">
                        <compSelector
                        v-model="formState.fkfh"
                        :compType="typeSelect"
                        :defaultValue="formState.fkfh"
                        dictionaryType="四大银行"
                        :width="150"
                        />
                    </a-form-item>
                    <div style="border-top: 1px solid rgb(233 228 228);margin: 10px 0;"/>
                    <!-- ---------------------- -->
                    <a-form-item label="聘任开始日期">
                        <a-date-picker v-model:value="formState.fspsj"/>
                    </a-form-item>
                    <a-form-item label="聘任结束日期">
                        <a-date-picker v-model:value="formState.fspjssj"/>
                    </a-form-item>
                    <a-form-item label="专业特长">
                        <compSelector
                        v-model="formState.fszly"
                        :compType="typeSelect"
                        :defaultValue="formState.fszly"
                        dictionaryType="药品生产专业特长"
                        :separateAreas="'zytc'+blobType.fywflcodeArr[blobType.menuType.indexOf(routeName.substr(routeName.indexOf('__'),routeName.indexOf('_a')+1))]"
                        :width="150"
                        />
                    </a-form-item>
                    <a-form-item label="等级">
                        <a-input
                        placeholder="请输入等级"
                        v-model:value="formState.flevel"/>
                    </a-form-item>
                    <a-form-item label="入库批次">
                        <a-input
                        placeholder="请输入入库批次"
                        v-model:value="formState.frkpc"/>
                    </a-form-item>
                    <a-form-item label="所属库">
                        <compSelector
                        v-if="!addEditParameter.isEdit"
                        v-model="formState.fssk" 
                        :compType="typeSelect"
                        :defaultValue="formState.fssk"
                        dictionaryType="核查员所属库"
                        :width="150"
                        />
                        <span v-else>{{ formState.fssk }}</span>
                    </a-form-item>
                    <a-form-item label="有效状态">
                        <compSelector
                        v-if="!addEditParameter.isEdit"
                        v-model="formState.fstate" 
                        :compType="typeSelect"
                        :defaultValue="formState.fstate"
                        dictionaryType="核查员有效状态"
                        :width="150"
                        />
                        <span v-else>{{ formState.fstate }}</span>
                    </a-form-item>
                    <a-form-item label="人员分类">
                        <compSelector
                        v-model="formState.fusertype" 
                        :compType="typeSelect"
                        :defaultValue="formState.fusertype"
                        dictionaryType="核查员分类"
                        :width="150"
                        />
                    </a-form-item>
                    
                    <a-form-item label="证书编号">
                        <a-input
                        placeholder="请输入证书编号"
                        v-model:value="formState.fzsbh"/>
                    </a-form-item>
                    <a-form-item label="聘用文件号">
                        <a-input
                        placeholder="请输入聘用文件号"
                        v-model:value="formState.fpywjh"/>
                    </a-form-item>
                    <a-form-item label="序列类型">
                        <compSelector
                        v-model="formState.fxllx" 
                        :compType="typeSelect"
                        :defaultValue="formState.fxllx"
                        dictionaryType="审评员序列类型代码"
                        :width="150"
                        />
                    </a-form-item>
                    <a-form-item label="审评类型">
                        <compSelector
                        v-model="formState.flx" 
                        :compType="typeSelect"
                        :defaultValue="formState.flx"
                        dictionaryType="核查员类型代码"
                        :width="150"
                        />
                    </a-form-item>
                    <a-form-item label="兼职情况">
                        <compSelector
                        v-model="formState.fjzqk" 
                        :compType="typeSelect"
                        :defaultValue="formState.fjzqk"
                        dictionaryType="审评员兼职情况代码"
                        :width="150"
                        />
                    </a-form-item>
                    <a-form-item label="审评员资格">
                        <compSelector
                        v-model="formState.fjcyzg" 
                        :compType="typeSelect"
                        :defaultValue="formState.fjcyzg"
                        dictionaryType="推荐核查员资格类型"
                        :width="150"
                        />
                    </a-form-item>
                    <a-form-item label="所属审评机构">
                        <compSelector
                        v-model="formState.fssjcjg" 
                        :compType="typeSelect"
                        :defaultValue="formState.fssjcjg"
                        dictionaryType="所属审评机构"
                        :width="150"
                        />
                    </a-form-item>
                    <!-- <a-form-item label="专业类型1">
                        <a-input
                        placeholder="请输入专业类型1"
                        v-model:value="formState.fzylx1"/>
                    </a-form-item>
                    <a-form-item label="专业类型2">
                        <a-input
                        placeholder="请输入专业类型2"
                        v-model:value="formState.fzylx2"/>
                    </a-form-item>
                    <a-form-item label="专业类型3">
                        <a-input
                        placeholder="请输入专业类型3"
                        v-model:value="formState.fzylx3"/>
                    </a-form-item> -->
                </a-form>
                <div style="margin-top: 30px;width: 100%;display: flex;justify-content: center;" v-if="addEditParameter.isEdit">
                    <a-button 
                    style="margin-left: 15px;" 
                    class="blue-btn" type="primary" 
                    @click="modifyPassword('重置密码',
                    {url:assessCheckApi.resetHcyPwd,method:'get',params:{fuserid:addEditParameter.fuserid}},
                    'params','')">重置密码</a-button>
                    <a-button 
                    style="margin-left: 15px;" 
                    class="blue-btn" type="primary" 
                    @click="modifyClick('账号',
                    {url:assessCheckApi.modifyHcyAccount,method:'put',data:{fuserid:addEditParameter.fuserid,username:formState.username,}},
                    'data','username','')">修改账号</a-button>
                    <a-button 
                    style="margin-left: 15px;" 
                    class="blue-btn" type="primary" 
                    @click="modifyClick('执勤状态',
                    {url:assessCheckApi.modifyHcyGzzt,method:'put',data:{fuserid:addEditParameter.fuserid,fgzzt:formState.fgzzt}},
                    'data','fgzzt','核查员工作状态')">修改执勤状态</a-button>
                    <a-button 
                    style="margin-left: 15px;" 
                    class="blue-btn" type="primary" 
                    @click="modifyClick('所属库',
                    {url:assessCheckApi.modifyHcySsk,method:'put',data:{id:addEditParameter.id,fssk:formState.fssk}},
                    'data','fssk','核查员所属库')">修改所属库</a-button>
                    <a-button 
                    style="margin-left: 15px;" 
                    class="blue-btn" type="primary" 
                    @click="modifyClick('有效状态',
                    {url:assessCheckApi.modifyHcyState,method:'put',data:{id:addEditParameter.id,fstate:formState.fstate}},
                    'data','fstate','核查员有效状态')">修改有效状态</a-button>
                </div>
                <a-modal 
                v-model:visible="separateVisible" 
                :title="'修改'+editInterfaceInfo.title"
                
                @ok="separateHandleOk">
                    <a-form
                    layout="inline" 
                    v-if="visibleShow" 
                    :form="form" 
                    :label-col="{ span: 8 }" 
                    :wrapper-col="{ span: 12 }">
                        <a-form-item label="账号" v-if="editInterfaceInfo.title == '账号'">
                            <a-input
                            :placeholder="'请输入'+editInterfaceInfo.title"
                            v-model="editInterfaceInfo.data[editInterfaceInfo.key][editInterfaceInfo.dataKey]"
                            />
                        </a-form-item>
                        <a-form-item :label="editInterfaceInfo.title" v-else>
                        <compSelector
                        :key="separateKey"
                        v-model="editInterfaceInfo.data[editInterfaceInfo.key][editInterfaceInfo.dataKey]" 
                        :compType="typeSelect"
                        :defaultValue="editInterfaceInfo.data[editInterfaceInfo.key][editInterfaceInfo.dataKey]"
                        :dictionaryType="editInterfaceInfo.dictionaryType"
                        :width="150"
                        />
                    </a-form-item>
                    </a-form>
                
                </a-modal>
            </a-spin>
        </a-modal>
    </div>
</template>
<script>
import { ref } from 'vue';
import {typeInput, typeNumber, typeSelect, typeCheckbox, typeRadio} from '@/components/compSearchCriteria/ContractType'
import compSelector from '@/components/compSelector/compSelector'
import validator from '@/common/validator'
import {addServe, editServe, ocalityPostAction, modifyServe} from './service/index'
import moment from 'moment'
import blobType from '@/common/blobType';
import assessCheckApi from './service/api'
export default {
    components:{
        compSelector
    },
    props:{
        addEditParameter:{
            type:Object,
            default:[]
        }
    },
    data(){
        return{
            spinning:true,
            showValue:'',
            showValue1:'',
            assessCheckApi:assessCheckApi,
            blobType:blobType,
            routeName:this.$route.name,
            typeRadio:typeRadio,
            typeSelect:typeSelect,
            form: this.$form.createForm(this, { name: 'coordinated' }),
            visibleShow:false,
            confirmLoading:false,
            typeSelect:typeSelect,
            formState:{
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                fuserid:'',
                username:'',
                id:'',
                realname:'',
            },
            rules:{
                username:[{
                    required: true,
                    message: '请输入账号',
                    trigger: 'blur',
                }],
                realname:[{
                    required: true,
                    message: '请输入真实姓名',
                    trigger: 'blur',
                }],
                fsfzh:[{
                    required: true,
                    message: '请输入身份证号',
                    trigger: 'blur',
                },{
                    pattern: validator.isIdCard.reg,
                    message: '请输入正确的身份证号',
                    trigger: 'blur',
                }],
                phone: [{
                    required: true,
                    message: '请输入手机号码',
                    trigger: 'blur',
                },{
                    pattern: validator.isPhone.reg,
                    message: '请输入正确的手机号码',
                    trigger: 'blur',
                }],
                // email:[{
                //     required: true,
                //     message: '请输入电子邮箱',
                //     trigger: 'blur',
                // },{
                //     pattern: validator.isEmail.reg,
                //     message: '请输入正确的电子邮箱',
                //     trigger: 'blur',
                // }],
                fgzdw:[{
                    required: true,
                    message: '请输入单位名称',
                    trigger: 'blur',
                }],
            },
            formRequer:'',
            optionsArr:[],
            submittedSuccessfully:false,
            editInterfaceInfo:{
                title:'',
                data:{
                    data:{
                       id:'' 
                    }
                },
                key:'data',
                dataKey:'id',
                dictionaryType:''
            },
            separateVisible:false,
            separateKey:null,
        }
    },
    watch:{
        addEditParameter(newval,oldVal){
            this.spinning = true
            //console.log('给了什么啊',newval)
            this.formState = {...this.formState,...newval}
            this.formState.fspsj = newval.fspsj?moment(newval.fspsj).format('YYYY-MM-DD'):''
            this.formState.fspjssj = newval.fspjssj?moment(newval.fspjssj).format('YYYY-MM-DD'):''
        }
    },
    mounted(){
        ocalityPostAction({dictName:'观察员所属地市'}).then(res=>{
                //console.log('字典的res',res)
                if(res.code == 200){
                    if(res.result.length){
                        this.optionsDataChange(res.result,{label:'itemText',value:'itemValue'})
                    }
                    
                }
            })
    },
    updated(){
        this.cancelLoading()
    },
    methods:{
        cancelLoading(){
            let timer = setInterval((val)=>{
                this.spinning = false
                clearInterval(timer);
            },500)
            
        },
        optionsDataChange(dataList,dataType){
            var newOptionArr = []
            //标识每一项的下标，并且添加到每一项
            dataList.forEach((item,index) => {
                 
                //console.log(newOptionArr.filter(l=>l.itemIndex === index))
                if(!newOptionArr.filter(l=>l.itemIndex === index).length){
                    newOptionArr.push({...item,itemIndex:index})
                }
            });
            //console.log('这是有下标的数组',newOptionArr)
            for (let i = 0; i <= newOptionArr.length; i++) {//打印的item为数组中的每一个对象
                let item = newOptionArr[i]
                let index = i
                for (let key in item) { //遍历数组中的对象
                    var currentItem = {}
                    //console.log(index)
                     
                    if(index === item.itemIndex){
                        currentItem = {
                            label:item[dataType.label],
                            value:item[dataType.value]
                        }
                        
                        if(!this.optionsArr.filter(l=>l.label === currentItem.label).length && currentItem.label){
                            this.optionsArr.push(currentItem)
                        }
                    }
                    

                }
            }
            //console.log('当前获取到的optionArr',this.optionsArr)
        },
        forderChange(val){
            //console.log(val)
            if(!val){
                this.formState.forder = 1
            }
        },
        //重置密码
        modifyPassword(text,data,key){
            var that = this
            this.$confirm({
                title:'您确认要重置密码吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    modifyServe(data).then(res=>{
                        if(res.code == 200){
                            that.$message.success(res.message)
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
            
        },
        
        modifyClick(text,data,key,dataKey,dictionaryType){
            this.editInterfaceInfo = {
                title:text,
                data:data,
                key:key,
                dataKey:dataKey,
                dictionaryType:dictionaryType
            }
            this.separateKey = Date.now()
            this.separateVisible = true
        },
        separateHandleOk(){
            if(!this.editInterfaceInfo.data[this.editInterfaceInfo.key][this.editInterfaceInfo.dataKey]){
                if(this.editInterfaceInfo.title == '账号'){
                    this.$message.warning('请输入账号')
                }else{
                    this.$message.warning('请选择'+this.editInterfaceInfo.title)
                }
            }else{
                
                var that = this
                this.$confirm({
                    title:'您确认要修改'+that.editInterfaceInfo.title+'吗？',
                    // icon: createVNode(ExclamationCircleOutlined),
                    onOk() {
                        modifyServe(that.editInterfaceInfo.data).then(res=>{
                            if(res.code == 200){
                                that.separateVisible = false
                                that.formState[that.editInterfaceInfo.dataKey] = that.editInterfaceInfo.data[that.editInterfaceInfo.key][that.editInterfaceInfo.dataKey]
                                that.$message.success(res.message)
                                this.$emit('handleOk',true,this.formState.id)
                            }else{
                                that.$message.warning(res.message)
                            }
                        })
                    },
                    
                });
            }
        },
        handleSubmit(e) {
            // e.preventDefault();
            var formState = {}
            this.form.validateFields((err, values) => {
                if (!err) {
                    this.formState.sex = this.formState.sex.value?this.formState.sex.value:this.formState.sex
                    this.formState.fgzzt = this.formState.fgzzt.value?this.formState.fgzzt.value:this.formState.fgzzt
                    this.formState.fssk = this.formState.fssk.value?this.formState.fssk.value:this.formState.fssk
                    this.formState.fstate = this.formState.fstate.value?this.formState.fstate.value:this.formState.fstate
                    this.formState.fusertype = this.formState.fusertype.value?this.formState.fusertype.value:this.formState.fusertype
                    this.confirmLoading = true
                    this.formState.fspsj = this.formState.fspsj? moment(this.formState.fspsj).format('YYYY-MM-DD'):'' 
                    this.formState.fspjssj = this.formState.fspjssj? moment(this.formState.fspjssj).format('YYYY-MM-DD'):''
                    var userMap = {
                        sex:this.formState.sex,
                        fuserid:this.formState.fuserid,
                        username:values.username,
                        realname:values.realname,
                        fsfzh:this.formState.fsfzh,
                        phone:values.phone,
                        email:this.formState.email,
                        fssqy:this.formState.fssqy,
                        fmz:this.formState.fmz,
                        fzzmm:this.formState.fzzmm,
                        fxl:this.formState.fxl,
                        fbyyx:this.formState.fbyyx,
                        fsxzy:this.formState.fsxzy,
                        fcsgz:this.formState.fcsgz,
                        fzc:this.formState.fzc,
                        fzw:this.formState.fzw,
                        fgzdw:values.fgzdw,
                        fgzdwdz:this.formState.fgzdwdz,
                        fdwdh:this.formState.fdwdh,
                        fdwyx:this.formState.fdwyx,
                        fgzzt:this.formState.fgzzt,
                        fyhkh:this.formState.fyhkh,
                        fkhhszd:this.formState.fkhhszd,
                        fkfh:this.formState.fkfh,
                        fdwlx:this.formState.fdwlx,
                        fsfyjsry:this.formState.fsfyjsry,
                    }
                    var hcyMap = {
                        fywflcode:this.formState.fywflcode,
                        id:this.formState.id,
                        fspsj:this.formState.fspsj,
                        fspjssj:this.formState.fspjssj,
                        fszly:this.formState.fszly,
                        flevel:this.formState.flevel,
                        frkpc:this.formState.frkpc,
                        fssk:this.formState.fssk,
                        fstate:this.formState.fstate,
                        fusertype:this.formState.fusertype,
                        fzsbh:this.formState.fzsbh,
                        // fzylx1:this.formState.fzylx1,
                        // fzylx2:this.formState.fzylx2,
                        // fzylx3:this.formState.fzylx3,
                        
                        fpywjh:this.formState.fpywjh,
                        fxllx:this.formState.fxllx,
                        flx:this.formState.flx,
                        fjzqk:this.formState.fjzqk,
                        fjcyzg:this.formState.fjcyzg,
                        fssjcjg:this.formState.fssjcjg,
                    }
                    if(this.formState.id){
                        editServe({hcyMap:hcyMap,userMap:userMap}).then(res=>{
                            if(res.code == 200){
                                this.submittedSuccessfully = true
                                this.$message.success('修改成功')
                                this.confirmLoading = false
                                this.visibleShow = false
                                this.$emit('handleOk',true,this.formState.id)
                            }else{
                                this.$message.warning(res.message)
                                this.confirmLoading = false
                            }
                        })
                    }else{
                        addServe({hcyMap:hcyMap,userMap:userMap}).then(res=>{
                            if(res.code == 200){
                                this.$message.success('添加成功')
                                
                                this.submittedSuccessfully = true
                                this.confirmLoading = false
                                this.visibleShow = false
                                this.$emit('handleOk',true,'')
                            }else{
                                this.$message.warning(res.message)
                                this.confirmLoading = false
                            }
                        })
                    }
                    
                }
            });
            
        },
        handleOk(){
            
            this.handleSubmit()
        }
    }

}

</script>
<style lang="less" scoped>
/* .ant-form-item-label{
    font-weight: 600;
} */

 .ant-modal-title{
    font-weight: 600;
 }
 .ant-modal-header{
    background: #5ca3e5;
 }
 .ant-upload-list{
    display: none !important;
 }
 .ant-modal-footer .ant-btn-primary{
    border: 1px solid #5ca3e5 !important;
    background-color: #5ca3e5 !important;
    color: #fff !important;
 }
 .inspectorLibrary-modal-add{
    .ant-form-item-label{
        width: 120px !important;
    }
    .ant-form-item-control-wrapper{
        width: 150px !important;
    }
 }
 .inspector-library-item-box{
    .ant-form-item-control-wrapper{
        width: 436px !important;
    }
}
 
</style>
<style lang="less">
.full-modal {
  .ant-modal {
    max-width: 100%;
    top: 0;
    padding-bottom: 0;
    margin: 0;
  }
  .ant-modal-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: calc(100vh);
  }
  .ant-modal-body {
    flex: 1;
    background: #fff !important;
  }
  .ant-modal-footer{
    background: #fff !important;
  }
}
</style>